package com.api.shopapi.service.impl;

import com.api.shopapi.entity.MedicationSchedulingNightItem;
import com.api.shopapi.mapper.MedicationSchedulingNightItemMapper;
import com.api.shopapi.service.MedicationSchedulingNightItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("MedicationSchedulingNightItemServiceImplOne")
public class MedicationSchedulingNightItemServiceImpl implements MedicationSchedulingNightItemService {

    @Autowired
    private MedicationSchedulingNightItemMapper medicationSchedulingNightItemMapper;


    @Override
    public int insert(MedicationSchedulingNightItem medicationSchedulingNightItem) {
        return medicationSchedulingNightItemMapper.insert(medicationSchedulingNightItem);
    }

    @Override
    public int updateByMedicationSchedulingNightItemCode(MedicationSchedulingNightItem medicationSchedulingNightItem) {
        return medicationSchedulingNightItemMapper.updateByMedicationSchedulingNightItemCode(medicationSchedulingNightItem);
    }

    @Override
    public int deleteByMedicationSchedulingNightItemCode(String medicationSchedulingNightItemCode) {
        return medicationSchedulingNightItemMapper.deleteByMedicationSchedulingNightItemCode(medicationSchedulingNightItemCode);
    }

    @Override
    public MedicationSchedulingNightItem getByMedicationSchedulingNightItemCode(String medicationSchedulingNightItemCode) {
        return medicationSchedulingNightItemMapper.getByMedicationSchedulingNightItemCode(medicationSchedulingNightItemCode);
    }

    @Override
    public List<MedicationSchedulingNightItem> getListByMedicationSchedulingNightCode(String medicationSchedulingNightCode) {
        return medicationSchedulingNightItemMapper.getListByMedicationSchedulingNightCode(medicationSchedulingNightCode);
    }

    @Override
    public int deleteByMedicationSchedulingNightCode(String medicationSchedulingNightCode) {
        return medicationSchedulingNightItemMapper.deleteByMedicationSchedulingNightCode(medicationSchedulingNightCode);
    }
}
